package com.empire.module.member.controller.admin.presentation.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Schema(description = "管理后台 - 报告新增/修改 Request VO")
@Data
public class PresentationSaveReqVO {

    @Schema(description = "数据ID", example = "26840", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Long id;

    @Schema(description = "报告名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "季度销售报告")
    @NotEmpty(message = "报告名称不能为空") // 字符串用@NotEmpty
    private String name;

    @Schema(description = "备注", example = "本月有意义的数据")
    private String remark;

    @Schema(description = "开始时间", example = "2025-09-20 10:12:30")
    @NotNull(message = "开始时间不能为空") // 日期类型用@NotNull
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @Schema(description = "结束时间", example = "2025-09-20 10:12:30")
    @NotNull(message = "结束时间不能为空") // 日期类型用@NotNull
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
}